package com.hualude.roadsign.model;

import javax.persistence.*;

/**
 * Created by pjn on 2017/4/20.
 */
@Entity
@Table(name = "tb_notice", schema = "hualude_db", catalog = "")
public class NoticeEntity {
    private Integer noticeId;
    private Integer createUserId;
    private String noticeTitle;
    private String noticeContent;
    private String noticeSendTime;
    private String noticePic;
    private Integer noticeType;

    @Id
    @Column(name = "NoticeId")
    @GeneratedValue ( strategy = GenerationType.IDENTITY )
    public Integer getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(Integer noticeId) {
        this.noticeId = noticeId;
    }

    @Basic
    @Column(name = "CreateUserId")
    public Integer getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }

    @Basic
    @Column(name = "NoticeTitle")
    public String getNoticeTitle() {
        return noticeTitle;
    }

    public void setNoticeTitle(String noticeTitle) {
        this.noticeTitle = noticeTitle;
    }

    @Basic
    @Column(name = "NoticeContent")
    public String getNoticeContent() {
        return noticeContent;
    }

    public void setNoticeContent(String noticeContent) {
        this.noticeContent = noticeContent;
    }

    @Basic
    @Column(name = "NoticeSendTime")
    public String getNoticeSendTime() {
        return noticeSendTime;
    }

    public void setNoticeSendTime(String noticeSendTime) {
        this.noticeSendTime = noticeSendTime;
    }

    @Basic
    @Column(name = "NoticePic")
    public String getNoticePic() {
        return noticePic;
    }

    public void setNoticePic(String noticePic) {
        this.noticePic = noticePic;
    }

    @Basic
    @Column(name = "NoticeType")
    public Integer getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(Integer noticeType) {
        this.noticeType = noticeType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NoticeEntity that = (NoticeEntity) o;

        if (noticeId != null ? !noticeId.equals(that.noticeId) : that.noticeId != null) return false;
        if (createUserId != null ? !createUserId.equals(that.createUserId) : that.createUserId != null) return false;
        if (noticeTitle != null ? !noticeTitle.equals(that.noticeTitle) : that.noticeTitle != null) return false;
        if (noticeContent != null ? !noticeContent.equals(that.noticeContent) : that.noticeContent != null)
            return false;
        if (noticeSendTime != null ? !noticeSendTime.equals(that.noticeSendTime) : that.noticeSendTime != null)
            return false;
        if (noticePic != null ? !noticePic.equals(that.noticePic) : that.noticePic != null) return false;
        if (noticeType != null ? !noticeType.equals(that.noticeType) : that.noticeType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = noticeId != null ? noticeId.hashCode() : 0;
        result = 31 * result + (createUserId != null ? createUserId.hashCode() : 0);
        result = 31 * result + (noticeTitle != null ? noticeTitle.hashCode() : 0);
        result = 31 * result + (noticeContent != null ? noticeContent.hashCode() : 0);
        result = 31 * result + (noticeSendTime != null ? noticeSendTime.hashCode() : 0);
        result = 31 * result + (noticePic != null ? noticePic.hashCode() : 0);
        result = 31 * result + (noticeType != null ? noticeType.hashCode() : 0);
        return result;
    }
}
